﻿/**
 * @name umi的路由配置
 * @description 只支持 path,component,routes,redirect,wrappers,name,icon,layout 的配置
 * @doc https://umijs.org/docs/guides/routes
 */
const routes = [{
  path: '/',
  redirect: '/dashboard/introduction'
},
// {
//   path: '/controlpannel',
//   name: '控制面板',

//   component: './ControlPannel'
// }, 
{
  path: '/dashboard',
  name: 'Dashboard',
  icon: '',
  routes: [{
    path: '/dashboard',
    redirect: '/dashboard/introduction'
  }, {
    path: '/dashboard/introduction',
    name: '系统介绍',
    component: './dashboard/Introduction'
  }, {
    path: '/dashboard/dashboard',
    name: 'Dashboard',
    component: './dashboard/Dashboard'
  }, {
    path: '/dashboard/add',
    name: '添加商品',
    component: './dashboard/Add'
  }]
},
{
  path: '/home',
  name: '首页配置',
  icon: '',
  // 首页的子路由
  routes: [
    //   {
    //   path: '/home',
    //   redirect: '/home/banner'
    // }, 
    {
      path: '/home/banner',
      name: '轮播图配置',
        icon: ' HomeOutlined',
      component: './home/Banner'
    }, {
      path: '/home/hotsale',
      name: '热销商品配置',
      component: './home/HotSale'
    }, {
      path: '/home/newest',
      name: '新品上线配置',
      component: './home/Newest'
    }, {
      path: '/home/recommend',
      name: '为你推荐配置',
      component: './home/Recommend'
    }]
},
{
  path: '/modulars',
  name: '模块管理',
  icon: '',
  routes: [{
    path: '/modulars/classify',
    name: '分类管理',
    component: './modulars/Classify'
  }, {
    path: '/modulars/goods',
    name: '商品管理',
    component: './modulars/Goods'
  }, {
    path: '/modulars/member',
    name: '会员管理',
    component: './modulars/Member'
  }, {
    path: '/modulars/order',
    name: '订单管理',
    component: './modulars/Order'
  }, {
    path: '/modulars/classify/level2',
    name: '分类二级管理',
    component: './modulars/Classify/level2',
    hideInMenu:true
  }, {
    path: '/modulars/classify/level3',
    name: '分类三级管理',
    component: './modulars/Classify/level3',
    hideInMenu:true
  },{
    path: '/modulars/order_detail',
    name: '订单详情',
    component: './modulars/Oreder_detail',
    hideInMenu:true
  }]
},
{
  path: '/system',
  name: '系统管理',
  icon: '',
  routes: [{
    path: '/system/system',
    name: '修改账户',
    component: './system/System'
  }]
}, {
  path: '/login',
  name: '用户登录',
  layout: false,
  component: './Login'
}, {
  path: '*',
  name: '找不到页面',
  layout: false,
  component: './404'
}];
export default routes;